﻿using System;
using System.Collections.Generic;
using System.Web;

namespace SystemModel
{
    /// <summary>
    /// 系统SESSION的封装类(系统会话对象)
    /// </summary>
    [Serializable]
    public class UserSession
    {
        private int m_userID = -1;
        private string m_userName = "";
        private string m_loginName = "";
        private int m_roleid = -1;
        private int _pageSize = 10;
        private IDictionary<string, string> m_UserMenu = new Dictionary<string, string>();

        /// <summary>
        /// SESSION的名字
        /// </summary>
        public static readonly string SESSIONNAME = "AppSession";

        /// <summary>
        /// 页面显示记录的条数
        /// </summary>
        public int PageSize
        {
            get { return _pageSize; }
            set { _pageSize = value; }
        }

        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserID
        {
            get { return m_userID; }
            set { m_userID = value; }
        }

        /// <summary>
        /// 用户姓名
        /// </summary>
        public string UserName
        {
            get { return m_userName; }
            set { m_userName = value; }
        }

        /// <summary>
        /// 用户登录名
        /// </summary>
        public string LoginName
        {
            get { return m_loginName; }
            set { m_loginName = value; }
        }

        /// <summary>
        /// 角色ID
        /// </summary>
        public int RoleId
        {
            get { return m_roleid; }
            set { m_roleid = value; }
        }

        /// <summary>
        /// 用户权限
        /// </summary>
        public IDictionary<string, string> UserMenu
        {
            get { return m_UserMenu; }
            set { m_UserMenu = value; }
        }
    }
}